package com.woniu.order.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 物流表
 * @TableName logistics
 */
@TableName(value ="logistics")
@Data
public class Logistics implements Serializable {
    /**
     * 物流单号
     */
    @TableId
    private String id;

    /**
     * 物流公司ID
     */
    private String logisticsCompanyId;

    /**
     * 物流公司名称
     */
    private String logisticsCompanyName;

    /**
     * 物流状态 0-已发货
     */
    private Integer logisticsStatus;

    /**
     * 起始点坐标
     */
    private String fromWhere;

    /**
     * 起始点地址名
     */
    private String fromAddr;

    /**
     * 终点坐标
     */
    private String toWhere;

    /**
     * 终点地址名
     */
    private String toAddr;

    /**
     * 物流轨迹信息
     */
    private String logistics;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Logistics other = (Logistics) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getLogisticsCompanyId() == null ? other.getLogisticsCompanyId() == null : this.getLogisticsCompanyId().equals(other.getLogisticsCompanyId()))
            && (this.getLogisticsCompanyName() == null ? other.getLogisticsCompanyName() == null : this.getLogisticsCompanyName().equals(other.getLogisticsCompanyName()))
            && (this.getLogisticsStatus() == null ? other.getLogisticsStatus() == null : this.getLogisticsStatus().equals(other.getLogisticsStatus()))
            && (this.getFromWhere() == null ? other.getFromWhere() == null : this.getFromWhere().equals(other.getFromWhere()))
            && (this.getFromAddr() == null ? other.getFromAddr() == null : this.getFromAddr().equals(other.getFromAddr()))
            && (this.getToWhere() == null ? other.getToWhere() == null : this.getToWhere().equals(other.getToWhere()))
            && (this.getToAddr() == null ? other.getToAddr() == null : this.getToAddr().equals(other.getToAddr()))
            && (this.getLogistics() == null ? other.getLogistics() == null : this.getLogistics().equals(other.getLogistics()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getLogisticsCompanyId() == null) ? 0 : getLogisticsCompanyId().hashCode());
        result = prime * result + ((getLogisticsCompanyName() == null) ? 0 : getLogisticsCompanyName().hashCode());
        result = prime * result + ((getLogisticsStatus() == null) ? 0 : getLogisticsStatus().hashCode());
        result = prime * result + ((getFromWhere() == null) ? 0 : getFromWhere().hashCode());
        result = prime * result + ((getFromAddr() == null) ? 0 : getFromAddr().hashCode());
        result = prime * result + ((getToWhere() == null) ? 0 : getToWhere().hashCode());
        result = prime * result + ((getToAddr() == null) ? 0 : getToAddr().hashCode());
        result = prime * result + ((getLogistics() == null) ? 0 : getLogistics().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", logisticsCompanyId=").append(logisticsCompanyId);
        sb.append(", logisticsCompanyName=").append(logisticsCompanyName);
        sb.append(", logisticsStatus=").append(logisticsStatus);
        sb.append(", fromWhere=").append(fromWhere);
        sb.append(", fromAddr=").append(fromAddr);
        sb.append(", toWhere=").append(toWhere);
        sb.append(", toAddr=").append(toAddr);
        sb.append(", logistics=").append(logistics);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}